package com.kun;

import com.kun.ba04.Student;
import org.junit.Test;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

/**
 * @author Administrator
 * @date 2021/7/12 0012 - 下午 20:34
 */
public class MyTest04 {

    @Test
    public void test01(){
        String config = "ba04/applicationContext.xml";
        ApplicationContext ac = new ClassPathXmlApplicationContext(config);


        Student myStudent= (Student) ac.getBean("myStudent");
        System.out.println("Student对象："+ myStudent);
    }
}
